package com.xyw.code.authorization.common.entity.constant;

/**
 * Created with IntelliJ IDEA.
 * User: xuyiwei
 * Date: 2020/3/2
 * Time: 上午10:58
 * Email: 1328312923@qq.com
 * Description: No Description
 **/
public class SecurityConstant {
    public static final String NONEXISTENT_URL = "NONEXISTENT_URL";

    public static final String X_CLIENT_TOKEN_USER = "x-client-token-user";

    public static final String OAUTH_TOKEN_URL = "/oauth/token";

    public static final String PHONE_KEY = "phone";

    /**
     * sys_oauth_client_details 表的字段 {scrypt}
     */
    public static final String CLIENT_FIELDS = "client_id, CONCAT('{bcrypt}',client_secret) as client_secret, resource_ids, scope, "
            + "authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, "
            + "refresh_token_validity, additional_information, autoapprove";

    /**
     * JdbcClientDetailsService 查询语句
     */
    public static final String BASE_FIND = "select " + CLIENT_FIELDS + " from oauth_client_details";

    /**
     * 默认的查询语句
     */
    public static final String DEFAULT_FIND = BASE_FIND + " order by client_id";

    /**
     * 按条件client_id 查询
     */
    public static final String DEFAULT_SELECT = BASE_FIND + " where client_id = ?";


}
